package com.yc.supermarket.entity;

import java.math.BigDecimal;
import java.util.Date;

/*交易实体类*/
public class Transaction {
    private Integer transactionId;
    private Integer userId;
    private float transactionAmount;
    private String cardNumber;
    private String transactionDate;
    private User user;
    private int transactionStatus;

    public Transaction() {
    }



    public Integer getTransactionId() {
        return transactionId;
    }

    public void setTransactionId(Integer transactionId) {
        this.transactionId = transactionId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public float getTransactionAmount() {
        return transactionAmount;
    }

    public void setTransactionAmount(float transactionAmount) {
        this.transactionAmount = transactionAmount;
    }

    public String getCardNumber() {
        return cardNumber;
    }

    public void setCardNumber(String cardNumber) {
        this.cardNumber = cardNumber;
    }

    public String getTransactionDate() {
        return transactionDate;
    }

    public void setTransactionDate(String transactionDate) {
        this.transactionDate = transactionDate;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public int getTransactionStatus() {
        return transactionStatus;
    }

    public void setTransactionStatus(int transactionStatus) {
        this.transactionStatus = transactionStatus;
    }

    public Transaction(Integer transactionId, Integer userId, float transactionAmount, String cardNumber, String transactionDate, User user, int transactionStatus) {
        this.transactionId = transactionId;
        this.userId = userId;
        this.transactionAmount = transactionAmount;
        this.cardNumber = cardNumber;
        this.transactionDate = transactionDate;
        this.user = user;
        this.transactionStatus = transactionStatus;
    }

    @Override
    public String toString() {
        return "Transaction{" +
                "transactionId=" + transactionId +
                ", userId=" + userId +
                ", transactionAmount=" + transactionAmount +
                ", cardNumber='" + cardNumber + '\'' +
                ", transactionDate='" + transactionDate + '\'' +
                ", user=" + user +
                ", transactionStatus=" + transactionStatus +
                '}';
    }
}
